#include "bga/system/Utilities.h"
#include <iostream>

using namespace std;

namespace Utilities
{

void split(const std::string& stringExt, std::vector<std::string>& extensions, const std::string& tokens)
{
    string s;

    for(unsigned int i = 0; i < stringExt.size(); i++)
    {
        /// if the char isn't in tokens string, we add it
        if(tokens.find(stringExt.at(i)) == string::npos)
        {
            s += stringExt.at(i);

        }
        else
        {
            extensions.push_back(s);
            s.clear();
        }
    }
    /// We put the last extension found
    extensions.push_back(s);
}

}
